Skip to content

Replace PageFind with Alogia search#606

Open
IEvangelist wants to merge 5 commits intomainfrom
dapine/replace-pagefind-search
Open

Replace PageFind with Alogia search#606
IEvangelist wants to merge 5 commits intomainfrom
dapine/replace-pagefind-search

Conversation

@IEvangelist
Copy link
Member

@IEvangelist IEvangelist commented Mar 25, 2026

Summary

This PR replaces the site's PageFind-based search with Algolia DocSearch via @astrojs/starlight-docsearch.

What changed

  • removed the custom Starlight search override and integrated the DocSearch plugin/client configuration
  • added the Algolia site verification meta tag
  • added localized DocSearch UI strings across the supported locales
  • added a search footer that points users to the dedicated C# and TypeScript API reference pages, since API reference content is intentionally omitted from this search index
  • removed now-obsolete pagefind: false frontmatter/options that only existed for PageFind
  • updated dependencies and lockfiles for the new search integration

Impact

Build time is now roughly 4-5 mins shorter because PageFind indexing no longer runs as part of the site build.

…e styles

- Added `docSearchI18nSchema` to extend i18n schema for search functionality.
- Updated i18n files for multiple languages (da, de, en, es, fr, hi, id, it, ja, ko, pt-BR, pt-PT, ru, tr, uk, zh-CN) to include DocSearch related translations.
- Removed `pagefind` option from various API reference pages to streamline search experience.
- Introduced a new `docsearch.config.ts` file for configuring DocSearch with Algolia.
- Added styles for DocSearch API reference notice in `site.css`.
Copilot AI review requested due to automatic review settings March 25, 2026 04:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the site search experience from PageFind-based Starlight search to Algolia DocSearch (via @astrojs/starlight-docsearch), including styling and i18n strings to support the new UI.

Changes:

  • Adds Starlight DocSearch plugin configuration and an Algolia verification meta tag.
  • Removes pagefind: false frontmatter/props from API reference pages and a docs page.
  • Adds DocSearch UI translation strings across all supported locales and styles the results footer notice.

Reviewed changes

Copilot reviewed 32 out of 34 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/frontend/src/styles/site.css Adds styling for a DocSearch results footer notice and buttons.
src/frontend/src/pages/reference/api/typescript/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/typescript/[module]/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/typescript/[module]/[item]/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/typescript/[module]/[item]/[member]/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/csharp/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/csharp/[package]/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/csharp/[package]/[type]/index.astro Removes pagefind: false from layout props.
src/frontend/src/pages/reference/api/csharp/[package]/[type]/[memberKind].astro Removes pagefind: false from layout props.
src/frontend/src/content/i18n/zh-CN.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/uk.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/tr.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/ru.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/pt-PT.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/pt-BR.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/ko.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/ja.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/it.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/id.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/hi.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/fr.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/es.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/en.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/de.json Adds DocSearch UI translation strings.
src/frontend/src/content/i18n/da.json Adds DocSearch UI translation strings.
src/frontend/src/content/docs/community/videos.mdx Removes pagefind: false from frontmatter.
src/frontend/src/content.config.ts Extends i18n schema with DocSearch schema (with TS suppression).
src/frontend/src/components/starlight/Head.astro Adds Algolia site verification meta tag.
src/frontend/pnpm-lock.yaml Adds preact lock entries.
src/frontend/package.json Adds preact to devDependencies.
src/frontend/config/docsearch.config.ts Introduces DocSearch client options (Algolia config + footer component).
src/frontend/astro.config.mjs Registers @astrojs/starlight-docsearch plugin and removes custom Search component override.
package.json Adds @astrojs/starlight-docsearch dependency at the repo root.
Files not reviewed (1)
  • src/frontend/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…nce mismatch

- Updated C# and TypeScript API reference links in docsearch.config.ts to use BASE_URL for proper routing.
- Added preact dependency in package.json and pnpm-lock.yaml.
- Fixed Zod instance mismatch in content.config.ts by casting the schema extension to any.
@IEvangelist IEvangelist requested a review from eerhardt March 25, 2026 23:16
@eerhardt
Copy link
Member

image

whys it still take so long?

@eerhardt
Copy link
Member

Shouldn't there be more removed code if we are removing PageFind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants